#include "VisualComponent.h"
#include "..\Managers\RenderManager.h"
#include "..\Engines\RenderEngine.h"


VisualComponent::VisualComponent(unsigned int p_view, const std::string& p_id, float p_layer)
{
	m_sprite = RenderManager::getSingleton().getRenderEngine()->createSprite(p_view, p_id, p_layer);
}


VisualComponent::~VisualComponent(void)
{
	RenderManager::getSingleton().getRenderEngine()->destroySprite(m_sprite);
}

void VisualComponent::translate(float x, float y)
{
	m_sprite->translate(x, y);
}

void VisualComponent::init(){}